diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-11-03 15:33:43 -0500 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-11-03 15:33:43 -0500 |
| commit | 30fa0c4c1faece6b054105fe3cce5107f24a2fa2 (patch) | |
| tree | 6b66eec84a702103f368f6a5ba0e96736fc56fd6 /ui/routes/(login)/invite/[invite]/+page.js | |
| parent | f2285a52822fbd1d82a24fe3b51c4343dc9e9ae6 (diff) | |
Svelte 5: go through and use runes in components, pages, and layouts.
Does not use runes in stores (yet).
Diffstat (limited to 'ui/routes/(login)/invite/[invite]/+page.js')
| -rw-r--r-- | ui/routes/(login)/invite/[invite]/+page.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ui/routes/(login)/invite/[invite]/+page.js b/ui/routes/(login)/invite/[invite]/+page.js index a48ba89..32c9290 100644 --- a/ui/routes/(login)/invite/[invite]/+page.js +++ b/ui/routes/(login)/invite/[invite]/+page.js @@ -1,12 +1,11 @@ import { getInvite } from '$lib/apiServer'; -export async function load({ params }) { - let { invite } = params; +async function loadInvite(invite) { let response = await getInvite(invite); switch (response.status) { case 200: { let invite = response.data; - return { invite }; + return invite; } case 404: return null; @@ -15,3 +14,10 @@ export async function load({ params }) { break; } } + +export function load({ params }) { + let { invite } = params; + return { + invite: loadInvite(invite) + }; +} |
